<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>

</body>
<script>
	// var a = {};
	// var b = {b: 1};
	// var c = {c: 2};
	// a[b] = 4;// a["[object Object]"]=4
	// a[c] = 5;// a["[object Object]"]=5;
	// console.log(a);
	// console.log(a[b]);// console.log(a["[object object]"])
	
	
	
	
	var a = {};
	var b = {b: 1};
	var c = {c: 2};
	a[JSON.stringify(b)] = 4;// a["{'b':1}"]=4
	a[JSON.stringify(c)] = 5;// a["{'c':2}"]=5;
	console.log(a);
	console.log(a[b]);//undefined console.log(a["[object,object]"])
	console.log(a[JSON.stringify(b)]);// 4  console.log(a['{"b":4}'])
	
	
	// localStorage.setItem("userName",{a:1,b:2})
	// console.log({a:1,b:2}.toString());// [object Object]
	// console.log({}.toString());// [object Object]
	
	// const obj = {a:1,b:2};
	// console.log("1111"+obj);
</script>
</html>